const router = require('koa-router')(),
  login=require('../models/likeState.js'),
  {con}=require('mysql2/promise'),
  log=console.log;

router.prefix('/login')

router.get('/likestate', async function (ctx, next) {
    const{ userId,id} = (ctx.query);
    console.log(userId,id);
    let unid = await login.likeState(userId,id);
    let deleteId = unid && await login.deleteId(unid[0].unid);
    ctx.body='成功'; 
})  

module.exports = router;
